<?php

namespace Swof\Routing;

use Swof\Support\ServiceProvider;

class RoutingServiceProvider extends ServiceProvider
{
    /**
     * @throws \Exception
     */
    public function register()
    {
        $this->registerRouter();
    }

    /**
     * Register the router instance.
     *
     * @return void
     * @throws \Exception
     */
    protected function registerRouter()
    {
        $this->app->singleton('router', function ($app) {
            return Router::instance();
        });
    }
}